package com.example.demo.domian;


import java.util.Objects;

public class Teacher {

    private String teacherNo;

    private String name;

    private String age;

    private String sex;

    private String school;

    private String teacherClass;

    private String subject;

    public Teacher(){};

    public Teacher(String teacherNo, String name, String age, String sex, String school, String teacherClass, String subject) {
        this.teacherNo = teacherNo;
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.school = school;
        this.teacherClass = teacherClass;
        this.subject = subject;
    }

    public String getTeacherNo() {
        return teacherNo;
    }

    public void setTeacherNo(String teacherNo) {
        this.teacherNo = teacherNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getTeacherClass() {
        return teacherClass;
    }

    public void setTeacherClass(String teacherClass) {
        this.teacherClass = teacherClass;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Teacher teacher = (Teacher) o;
        return Objects.equals(teacherNo, teacher.teacherNo) && Objects.equals(name, teacher.name) && Objects.equals(age, teacher.age) && Objects.equals(sex, teacher.sex) && Objects.equals(school, teacher.school) && Objects.equals(teacherClass, teacher.teacherClass) && Objects.equals(subject, teacher.subject);
    }

    @Override
    public int hashCode() {
        return Objects.hash(teacherNo, name, age, sex, school, teacherClass, subject);
    }

    @Override
    public String toString() {
        return
                "教职编号=" + teacherNo +"\t" +
                "姓名=" + name +"\t" +
                "年龄=" + age +"\t" +
                "性别=" + sex +"\t" +
                "学院=" + school +"\t" +
                "教学班级=" + teacherClass +"\t" +
                "教学科目=" + subject;
    }
}
